Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gene-trajectory-python recipe #51476

Merged
merged 10 commits into from
Oct 19, 2024
Merged

Add gene-trajectory-python recipe #51476

merged 10 commits into from
Oct 19, 2024

Conversation

fra-pcmgf
Copy link
Contributor

@fra-pcmgf fra-pcmgf commented Oct 18, 2024

Add the Python version of Gene-Trajectory (https://github.com/KlugerLab/GeneTrajectory-python) to bioconda.
The method is described in detail in the article Gene trajectory inference for single-cell data by optimal transport metrics, Documentation and tutorials are available at https://genetrajectory-python.readthedocs.io/.


Please read the guidelines for Bioconda recipes before opening a pull request (PR).

General instructions

  • If this PR adds or updates a recipe, use "Add" or "Update" appropriately as the first word in its title.
  • New recipes not directly relevant to the biological sciences need to be submitted to the conda-forge channel instead of Bioconda.
  • PRs require reviews prior to being merged. Once your PR is passing tests and ready to be merged, please issue the @BiocondaBot please add label command.
  • Please post questions on Gitter or ping @bioconda/core in a comment.

Instructions for avoiding API, ABI, and CLI breakage issues

Conda is able to record and lock (a.k.a. pin) dependency versions used at build time of other recipes.
This way, one can avoid that expectations of a downstream recipe with regards to API, ABI, or CLI are violated by later changes in the recipe.
If not already present in the meta.yaml, make sure to specify run_exports (see here for the rationale and comprehensive explanation).
Add a run_exports section like this:

build:
  run_exports:
    - ...

with ... being one of:

Case run_exports statement
semantic versioning {{ pin_subpackage("myrecipe", max_pin="x") }}
semantic versioning (0.x.x) {{ pin_subpackage("myrecipe", max_pin="x.x") }}
known breakage in minor versions {{ pin_subpackage("myrecipe", max_pin="x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
known breakage in patch versions {{ pin_subpackage("myrecipe", max_pin="x.x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
calendar versioning {{ pin_subpackage("myrecipe", max_pin=None) }}

while replacing "myrecipe" with either name if a name|lower variable is defined in your recipe or with the lowercase name of the package in quotes.

Bot commands for PR management

Please use the following BiocondaBot commands:

Everyone has access to the following BiocondaBot commands, which can be given in a comment:

@BiocondaBot please update Merge the master branch into a PR.
@BiocondaBot please add label Add the please review & merge label.
@BiocondaBot please fetch artifacts Post links to CI-built packages/containers.
You can use this to test packages locally.

Note that the @BiocondaBot please merge command is now depreciated. Please just squash and merge instead.

Also, the bot watches for comments from non-members that include @bioconda/<team> and will automatically re-post them to notify the addressed <team>.

Copy link
Contributor

coderabbitai bot commented Oct 18, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes in this pull request introduce a new LICENSE file to the recipes/gene-trajectory-python directory, specifying the terms of the MIT License. This license allows individuals to use, copy, modify, merge, publish, distribute, sublicense, and sell copies of the software, and includes a copyright notice for PCMGF-Limited. Additionally, a new metadata file meta.yaml has been created for the gene-trajectory-python package, detailing its configuration for building and installation. This file defines the package name as "gene-trajectory-python" with version "1.0.4", and includes a source URL for downloading the package from PyPI along with a SHA256 checksum for integrity verification. The build section indicates that the package is architecture-independent and provides a script for installation using pip. The requirements section outlines both host and runtime dependencies, specifying versions for Python and various libraries. The test section includes commands to verify installation, and the about section provides information about the package, including its homepage and documentation links.

Possibly related PRs

  • [Update meta.yaml for spec2vec #49857] Update meta.yaml for spec2vec: This PR also involves changes to a meta.yaml file, although it focuses on a different package (spec2vec) and does not relate to the gene-trajectory-python package.
  • [Add gsmap #50861] Add gsmap: Similar to the main PR, this PR introduces a new meta.yaml file for a different package (gsmap), detailing its configuration for building and installation.
  • [Add in new package mutamr #51139] Add in new package mutamr: This PR introduces a new package with a LICENSE file and a meta.yaml, similar to the structure seen in the main PR.
  • [Add patchify #51268] Add patchify: This PR introduces a new package with a meta.yaml file, similar to the main PR's structure.
  • [Add meta_eukaryome_detect #51328] Add meta_eukaryome_detect: This PR introduces a new package with a meta.yaml file, similar to the main PR's structure.
  • [Update meta_eukaryome_detect: Rename meta.yml to meta.yaml #51366] Update meta_eukaryome_detect: This PR updates a meta.yaml file for the meta_eukaryome_detect package, similar to the main PR's structure.

Suggested labels

please review & merge

Suggested reviewers

  • mencian

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between aee72de and cf4066d.

📒 Files selected for processing (1)
  • recipes/gene-trajectory-python/meta.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/gene-trajectory-python/meta.yaml

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

🔇 Additional comments (7)
recipes/gene-trajectory-python/meta.yaml (7)

1-10: LGTM: Package and source sections are well-defined.

The package name, version, source URL, and SHA256 checksum are correctly specified. This ensures proper identification and integrity of the package source.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


38-45: LGTM: Test section is well-defined.

The test section includes appropriate checks for package installation and importability. The use of pip check and a simple import test are good practices to ensure the package and its dependencies are correctly installed and functional.


60-62: LGTM: Extra section is correctly defined.

The extra section properly specifies the recipe maintainer, which is important for future maintenance and updates of the package.


1-1: Note: Ignore yamllint syntax error for Jinja2 syntax.

The yamllint tool reports a syntax error for the '%' character at the beginning of the file. This is a false positive, as the '%' character is part of the Jinja2 template syntax commonly used in Conda recipes. You can safely ignore this warning.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


12-17: 🛠️ Refactor suggestion

Consider a more flexible pinning strategy.

The build section is well-defined, but the run_exports pinning strategy might be too strict. For most Python packages, it's recommended to use a more flexible pinning strategy to allow for minor version updates.

Consider updating the run_exports section as follows:

run_exports:
  - {{ pin_subpackage(name|lower, max_pin='x.x') }}

This allows for minor version updates while still maintaining compatibility.


19-36: 🛠️ Refactor suggestion

Consider relaxing version constraints for some dependencies.

The requirements section is comprehensive, but some version constraints might be unnecessarily strict. This could lead to potential conflicts with other packages in the Conda environment.

Consider relaxing the version constraints for some dependencies, especially those that are unlikely to introduce breaking changes in minor versions. For example:

requirements:
  run:
    - python >=3.9
    - python-igraph >=0.10,<0.11
    - matplotlib-base >=3.6,<4
    - numpy >=1.25,<2
    - pandas >=1.5,<2
    - pot >=0.8.2,<0.9
    - scanpy >=1.9.3,<2
    - scikit-misc >=0.1.3,<0.2
    - scikit-learn >=0.24,<2
    - scipy >=1.8,<2
    - seaborn >=0.13,<0.14
    - tqdm >=4.64.1,<5

This approach allows for minor version updates while still maintaining compatibility.


47-57: ⚠️ Potential issue

Include the LICENSE file in the recipe directory.

The about section provides comprehensive information about the package. However, the license_file is specified, but it's not included in the recipe directory. To ensure compliance with Conda packaging guidelines, please add the following steps:

  1. Download the LICENSE file from the GitHub repository.
  2. Add it to the recipe directory (next to meta.yaml).
  3. Update the meta.yaml to reference the local LICENSE file:
about:
  ...
  license_file: LICENSE
  ...

This ensures that the license is properly packaged with the Conda package.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
recipes/gene-trajectory-python/meta.yaml (2)

17-34: Requirements are well-defined, but consider adding run_exports.

The host and run requirements are comprehensive and include appropriate version constraints. However, as mentioned in the PR objectives, consider adding a run_exports section to prevent API, ABI, and CLI breakage issues.

Example:

build:
  ...
  run_exports:
    - {{ pin_subpackage('gene-trajectory-python', max_pin='x.x') }}

This ensures that packages depending on gene-trajectory-python will use a compatible version.


44-50: LGTM: About section is comprehensive.

The about section includes all required fields and provides valuable information about the package. Consider adding a more detailed description of the package functionality if available.

Suggestion:

about:
  ...
  description: |
    Gene Trajectory is a Python package that computes and analyzes gene trajectories in single-cell data.
    It provides tools for trajectory inference, gene expression analysis along trajectories, and visualization of results.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between c8e118e and edcf570.

📒 Files selected for processing (1)
  • recipes/gene-trajectory-python/meta.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/gene-trajectory-python/meta.yaml

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

🔇 Additional comments (6)
recipes/gene-trajectory-python/meta.yaml (6)

1-6: LGTM: Package section is well-defined.

The package name and version are correctly specified using Jinja2 variables. The lowercase filter on the package name is a good practice to ensure consistency.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


12-15: LGTM: Build section follows Bioconda best practices.

The build section is well-configured:

  • noarch: python is appropriate for a pure Python package.
  • The installation command uses --no-deps and --no-build-isolation, which aligns with Bioconda guidelines.
  • The build number is correctly set to 0 for a new package.

36-42: LGTM: Test section is well-configured.

The test section includes appropriate checks:

  • Import check for gene_trajectory verifies the package can be imported.
  • pip check ensures all dependencies are satisfied.
    These tests align with Bioconda best practices for package verification.

53-55: LGTM: Extra section correctly specifies the recipe maintainer.

The recipe maintainer is properly listed, which is essential for package maintenance and updates.


1-1: Note on static analysis warning

The yamllint tool reported a syntax error for the '%' character at the beginning of the file. This is a false positive as the '%' is part of the Jinja2 template syntax, which is correctly used in Conda recipe meta.yaml files. No action is required to address this warning.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


8-10: LGTM: Source section is correctly defined.

The source URL is properly structured for PyPI packages, and the use of Jinja2 variables ensures consistency. The inclusion of the SHA256 checksum is crucial for package integrity.

Let's verify the checksum:

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (4)
recipes/gene-trajectory-python/meta.yaml (4)

8-10: LGTM: Source section is correctly defined.

The source URL and SHA256 checksum are properly specified. The use of Jinja2 variables in the URL construction is a good practice.

Consider adding a comment above the sha256 line to indicate the version of the package this checksum corresponds to. This can be helpful when updating the recipe in the future.

  # sha256 for version 1.0.4
  sha256: 133e22dd167cbc83b8d4ecffa98bfc623f98584b91d2ecf31b915aeb11072b73

12-17: LGTM: Build section is well-configured.

The build configuration is correct for a pure Python package. The use of run_exports is good for managing dependency versions across the Conda ecosystem.

Consider adding a comment explaining the purpose of the run_exports section, as it's not immediately obvious to all contributors. For example:

  run_exports:
    # This ensures that other packages depending on gene-trajectory-python
    # will use a compatible version when it's updated
    - {{ pin_subpackage(name|lower, max_pin="x") }}

38-44: LGTM: Test section is adequate.

The test section includes basic checks to ensure the package can be imported and that all dependencies are satisfied.

Consider adding a simple functional test to verify that the package works as expected. For example:

test:
  imports:
    - gene_trajectory
  commands:
    - pip check
    - python -c "import gene_trajectory; print(gene_trajectory.__version__)"
  requires:
    - pip

This additional test will verify that the package's version can be accessed, which is a common way to ensure the package is installed correctly.


59-61: LGTM: Extra section includes a maintainer.

The inclusion of a recipe maintainer is crucial for the Bioconda ecosystem.

Consider adding more maintainers to ensure continued support and maintenance of the package. It's a good practice to have at least two maintainers. You could reach out to other contributors of the gene-trajectory-python project or Bioconda community members who might be interested in helping maintain this recipe.

Example:

extra:
  recipe-maintainers:
    - fra-pcmgf
    # Consider adding additional maintainers here
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between edcf570 and ea0317e.

📒 Files selected for processing (1)
  • recipes/gene-trajectory-python/meta.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/gene-trajectory-python/meta.yaml

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

🔇 Additional comments (3)
recipes/gene-trajectory-python/meta.yaml (3)

1-6: LGTM: Package section is well-defined.

The package name and version are correctly specified using Jinja2 variables, which is a best practice in Conda recipes.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


1-61: Overall, the gene-trajectory-python recipe is well-structured and follows Bioconda guidelines.

Great job on creating this recipe! It covers all the necessary sections and provides comprehensive information about the package. Here's a summary of the suggestions for improvement:

  1. Add a version comment for the SHA256 checksum.
  2. Include a comment explaining the purpose of the run_exports section.
  3. Verify the build system (Flit) by checking the pyproject.toml file.
  4. Add a simple functional test to verify the package version.
  5. Include the LICENSE file in the recipe directory.
  6. Consider adding more maintainers to the recipe.

These minor enhancements will improve the recipe's maintainability and completeness. Once these suggestions are addressed, the recipe will be in excellent shape for inclusion in the Bioconda repository.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


19-36: LGTM: Requirements are well-defined.

The host and run requirements are comprehensive and include appropriate version constraints. The use of flit-core in the host requirements suggests this package uses the Flit build system.

To ensure the build system is correctly specified, let's verify the presence of a pyproject.toml file in the source distribution:

This script will help confirm that the package indeed uses Flit as its build system.

Comment on lines +46 to +56
about:
home: https://github.com/KlugerLab/GeneTrajectory-python
summary: Compute gene trajectories
description: |
Gene Trajectory is a Python package that computes and analyzes gene trajectories in single-cell data.
It provides tools for trajectory inference, gene expression analysis along trajectories, and visualization of results.

license: MIT
license_file: LICENSE
doc_url: https://github.com/KlugerLab/GeneTrajectory-python
dev_url: https://github.com/KlugerLab/GeneTrajectory-python
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

LGTM: About section is comprehensive.

The about section provides all necessary information about the package, including its purpose, license, and relevant URLs.

The license_file is specified, but it's not included in the recipe. To ensure compliance with Conda packaging guidelines, you should include the LICENSE file in the recipe directory. Please add the following steps:

  1. Download the LICENSE file from the GitHub repository.
  2. Add it to the recipe directory (next to meta.yaml).
  3. Update the meta.yaml to reference the local LICENSE file:
about:
  ...
  license_file: LICENSE
  ...

This ensures that the license is properly packaged with the Conda package.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
recipes/gene-trajectory-python/meta.yaml (2)

19-36: LGTM: Requirements are well-defined, with a minor suggestion.

The host and run requirements are comprehensive and include appropriate version constraints. The use of matplotlib-base instead of matplotlib is a good practice for conda-forge recipes.

For consistency with other packages, consider adding upper bounds to the Python requirement in both host and run sections:

- python >=3.9,<4.0a0

This helps prevent potential issues with future major Python versions while still allowing for minor version updates.


38-45: LGTM: Test section is good, with a suggestion for improvement.

The test section includes appropriate checks:

  • Verifying that the package can be imported.
  • Using pip check to ensure all dependencies are satisfied.

To enhance the test coverage, consider adding a command to run the package's test suite if one is available. For example:

commands:
  - pip check
  - python -m pytest --pyargs gene_trajectory

This would provide more comprehensive testing of the package functionality.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between ea0317e and 9c84e05.

📒 Files selected for processing (2)
  • recipes/gene-trajectory-python/LICENSE (1 hunks)
  • recipes/gene-trajectory-python/meta.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • recipes/gene-trajectory-python/LICENSE
🧰 Additional context used
🪛 yamllint
recipes/gene-trajectory-python/meta.yaml

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

🔇 Additional comments (5)
recipes/gene-trajectory-python/meta.yaml (5)

1-10: LGTM: Package and source information are well-defined.

The package name, version, and source URL are correctly specified using Jinja2 templating. The SHA256 checksum is provided, ensuring integrity of the downloaded package.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


12-18: LGTM: Build section is well-configured.

The build section is correctly set up:

  • noarch: python is appropriate for a pure Python package.
  • The installation script uses the correct flags to prevent dependency resolution during build.
  • The use of run_exports with pin_subpackage is excellent. This ensures that when other packages depend on gene-trajectory-python, they will automatically get the correct version constraints.

This configuration helps maintain consistency and prevents potential compatibility issues in the Conda ecosystem.


59-61: LGTM: Maintainer information is correct.

The extra section correctly lists the recipe maintainer as fra-pcmgf, which matches the PR submitter mentioned in the PR objectives.


1-61: Overall, the recipe is well-constructed and ready for inclusion.

This meta.yaml file follows Bioconda guidelines and provides all necessary information for building and distributing the gene-trajectory-python package. Here's a summary of the key points and action items:

  1. The package, source, build, and requirements sections are well-defined.
  2. Test and about sections provide good coverage, with minor suggestions for improvement.
  3. The use of run_exports is excellent for maintaining consistency in the Conda ecosystem.

Action items:

  1. Verify the presence of the LICENSE file in the recipe directory and add it if missing.
  2. Consider adding upper bounds to the Python requirement for consistency.
  3. If available, add a command to run the package's test suite in the test section.

These minor improvements will further enhance the quality of the recipe, but the current version is already in good shape for inclusion in the Bioconda repository.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


46-56: Verify the LICENSE file inclusion.

The about section is comprehensive and provides all necessary information. However, there's an important step to complete:

  1. Ensure that the LICENSE file is present in the recipe directory (next to meta.yaml).
  2. If it's not there, download it from the GitHub repository and add it to the recipe directory.

This step is crucial for compliance with Conda packaging guidelines and ensures that the license is properly packaged with the Conda package.

To verify the presence of the LICENSE file, you can run the following command:

✅ Verification successful

LICENSE file is correctly included in the recipe directory.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the LICENSE file exists in the recipe directory
if [ -f "recipes/gene-trajectory-python/LICENSE" ]; then
    echo "LICENSE file is present in the recipe directory."
else
    echo "LICENSE file is missing from the recipe directory."
    echo "Please download it from the GitHub repository and add it to the recipe directory."
fi

Length of output: 158

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 9c84e05 and 7cbda2f.

📒 Files selected for processing (1)
  • recipes/gene-trajectory-python/meta.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/gene-trajectory-python/meta.yaml

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

🔇 Additional comments (5)
recipes/gene-trajectory-python/meta.yaml (5)

1-10: LGTM: Package and source sections are well-defined.

The package name, version, and source URL are correctly specified. The inclusion of the SHA256 checksum is a good practice for ensuring package integrity.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


38-46: LGTM: Comprehensive test section.

The test section is well-defined and includes:

  1. Import checks for the main package.
  2. Dependency verification using pip check.
  3. Running package tests with pytest.

This approach ensures thorough testing of the package installation and functionality.


60-62: LGTM: Maintainer information is correctly specified.

The extra section properly identifies the recipe maintainer.


1-1: Note: Ignore the YAML syntax error for Jinja2 templating.

The static analysis tool (yamllint) reports a syntax error for the '%' character. This is a false positive due to the use of Jinja2 templating in Conda recipes. The syntax is correct for this context and can be safely ignored.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


47-57: ⚠️ Potential issue

Address the LICENSE file issue.

The about section is comprehensive and provides all necessary information. However, there's an outstanding issue regarding the LICENSE file.

To resolve this issue:

  1. Download the LICENSE file from the GitHub repository.
  2. Add it to the recipe directory (next to meta.yaml).
  3. Ensure the meta.yaml references the local LICENSE file:
about:
  ...
  license_file: LICENSE
  ...

This ensures that the license is properly packaged with the Conda package and complies with Conda packaging guidelines.

Comment on lines +12 to +17
build:
noarch: python
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
number: 0
run_exports:
- {{ pin_subpackage(name|lower, max_pin="x") }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider a more flexible pinning strategy.

The build section is well-defined, but the run_exports pinning strategy might be too strict. For most Python packages, it's recommended to use a more flexible pinning strategy to allow for minor version updates.

Consider updating the run_exports section as follows:

run_exports:
  - {{ pin_subpackage(name|lower, max_pin='x.x') }}

This allows for minor version updates while still maintaining compatibility.

Comment on lines 19 to 36
requirements:
host:
- python >=3.9,<4.0a0
- flit-core >=3.2,<4
- pip
run:
- python >=3.9
- igraph >=0.10
- matplotlib-base >=3.6
- numpy >=1.25
- pandas >=1.5
- pot >=0.8.2
- scanpy >=1.9.3
- scikit-misc >=0.1.3
- scikit-learn >=0.24
- scipy >=1.8
- seaborn >=0.13
- tqdm >=4.64.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider relaxing version constraints for some dependencies.

The requirements section is comprehensive, but some version constraints might be unnecessarily strict. This could lead to potential conflicts with other packages in the Conda environment.

Consider relaxing the version constraints for some dependencies, especially those that are unlikely to introduce breaking changes in minor versions. For example:

requirements:
  run:
    - python >=3.9
    - igraph >=0.10,<0.11
    - matplotlib-base >=3.6,<4
    - numpy >=1.25,<2
    - pandas >=1.5,<2
    - pot >=0.8.2,<0.9
    - scanpy >=1.9.3,<2
    - scikit-misc >=0.1.3,<0.2
    - scikit-learn >=0.24,<2
    - scipy >=1.8,<2
    - seaborn >=0.13,<0.14
    - tqdm >=4.64.1,<5

This approach allows for minor version updates while still maintaining compatibility.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
recipes/gene-trajectory-python/meta.yaml (1)

38-44: LGTM: Test section is well-defined. Consider adding a simple functionality test.

The test section includes appropriate import checks and a pip check command, which are good practices. To further improve the testing, consider adding a simple functionality test if possible. For example:

test:
  imports:
    - gene_trajectory
  commands:
    - pip check
    - python -c "import gene_trajectory; assert gene_trajectory.__version__ == '1.0.4'"
  requires:
    - pip

This additional test ensures that the imported package has the correct version.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 08d9512 and 88707a9.

📒 Files selected for processing (1)
  • recipes/gene-trajectory-python/meta.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/gene-trajectory-python/meta.yaml

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

🔇 Additional comments (6)
recipes/gene-trajectory-python/meta.yaml (6)

1-10: LGTM: Package and source sections are well-defined.

The package name, version, source URL, and SHA256 checksum are correctly specified. This ensures proper identification and integrity of the package source.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


59-61: LGTM: Extra section is correctly defined.

The extra section properly specifies the recipe maintainer, which is important for package management and communication.


1-1: Note: Ignore yamllint syntax error for '%' character.

The static analysis tool yamllint reports a syntax error for the '%' character at the beginning of the file. This is a false positive. The '%' character is correctly used here for Jinja2 templating in Conda recipes and is valid in this context. No action is required to address this warning.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


12-17: 🛠️ Refactor suggestion

Consider a more flexible pinning strategy.

The build section is well-defined, but the run_exports pinning strategy might be too strict. For most Python packages, it's recommended to use a more flexible pinning strategy to allow for minor version updates.

Consider updating the run_exports section as follows:

run_exports:
  - {{ pin_subpackage(name|lower, max_pin='x.x') }}

This allows for minor version updates while still maintaining compatibility.


19-36: 🛠️ Refactor suggestion

Consider relaxing version constraints for some dependencies.

The requirements section is comprehensive, but some version constraints might be unnecessarily strict. This could lead to potential conflicts with other packages in the Conda environment.

Consider relaxing the version constraints for some dependencies, especially those that are unlikely to introduce breaking changes in minor versions. For example:

requirements:
  run:
    - python >=3.9
    - python-igraph >=0.10,<0.11
    - matplotlib-base >=3.6,<4
    - numpy >=1.25,<2
    - pandas >=1.5,<2
    - pot >=0.8.2,<0.9
    - scanpy >=1.9.3,<2
    - scikit-misc >=0.1.3,<0.2
    - scikit-learn >=0.24,<2
    - scipy >=1.8,<2
    - seaborn >=0.13,<0.14
    - tqdm >=4.64.1,<5

This approach allows for minor version updates while still maintaining compatibility.


46-56: ⚠️ Potential issue

Include the LICENSE file in the recipe directory.

The about section provides comprehensive information about the package. However, the license_file is specified, but it's not included in the recipe directory. To ensure compliance with Conda packaging guidelines, please follow these steps:

  1. Download the LICENSE file from the GitHub repository.
  2. Add it to the recipe directory (next to meta.yaml).
  3. Ensure that the meta.yaml references the local LICENSE file:
about:
  ...
  license_file: LICENSE
  ...

This ensures that the license is properly packaged with the Conda package.

@fra-pcmgf
Copy link
Contributor Author

@BiocondaBot please add label

@BiocondaBot BiocondaBot added the please review & merge set to ask for merge label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
please review & merge set to ask for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants